home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / compar1r / asciicon.frm (.txt) next >
Encoding:
Visual Basic Form  |  1999-07-01  |  2.1 KB  |  74 lines

  1. VERSION 5.00
  2. Begin VB.Form AsciiConvert 
  3.    BorderStyle     =   1  'Fixed Single
  4.    Caption         =   "Ascii Converter"
  5.    ClientHeight    =   975
  6.    ClientLeft      =   45
  7.    ClientTop       =   330
  8.    ClientWidth     =   3255
  9.    LinkTopic       =   "Form1"
  10.    MaxButton       =   0   'False
  11.    MinButton       =   0   'False
  12.    ScaleHeight     =   975
  13.    ScaleWidth      =   3255
  14.    StartUpPosition =   3  'Windows Default
  15.    Begin VB.TextBox Char 
  16.       Height          =   375
  17.       Left            =   1680
  18.       TabIndex        =   1
  19.       Top             =   480
  20.       Width           =   1455
  21.    End
  22.    Begin VB.TextBox Ascii 
  23.       Height          =   375
  24.       Left            =   120
  25.       TabIndex        =   0
  26.       Top             =   480
  27.       Width           =   1455
  28.    End
  29.    Begin VB.Label lblChar 
  30.       Alignment       =   2  'Center
  31.       Caption         =   "Character"
  32.       Height          =   255
  33.       Left            =   1680
  34.       TabIndex        =   3
  35.       Top             =   120
  36.       Width           =   1455
  37.    End
  38.    Begin VB.Label lblAscii 
  39.       Alignment       =   2  'Center
  40.       Caption         =   "Ascii Code"
  41.       Height          =   255
  42.       Left            =   120
  43.       TabIndex        =   2
  44.       Top             =   120
  45.       Width           =   1455
  46.    End
  47. Attribute VB_Name = "AsciiConvert"
  48. Attribute VB_GlobalNameSpace = False
  49. Attribute VB_Creatable = False
  50. Attribute VB_PredeclaredId = True
  51. Attribute VB_Exposed = False
  52. Option Explicit
  53. Private Sub Ascii_Change()
  54.     If IsNumeric(Ascii.Text) = True Then
  55.         If Ascii.Text > 255 Then
  56.             Ascii.Text = "255"
  57.         ElseIf Ascii.Text < 0 Then
  58.             Ascii.Text = "0"
  59.         End If
  60.         Char.Text = Chr(Ascii.Text)
  61.     Else
  62.         Ascii.Text = ""
  63.     End If
  64. End Sub
  65. Private Sub Char_Change()
  66.     If Char.Text = "" Then
  67.     ElseIf Ascii.Text = "game" Or Ascii.Text = "play" Then
  68.         MsgBox ("Click on File, then Game to play the Ascii Game")
  69.         AsciiTable.mnuGame.Visible = True
  70.     Else
  71.         Ascii.Text = Asc(Char.Text)
  72.     End If
  73. End Sub
  74.